<template>
  <div class="header" v-show="isHeader">
    <span @click="go">返回</span>
    <div>
      {{this.$route.name}}
    </div>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  name: "nineUl",
  data() {
    return {};
  },
  methods:{
    go(){
      this.$emit('on-base')
    }
  },
  computed:{
    ...mapState({
      isHeader:'isHeader'
    })
  }
};

</script>

<style scoped lang="less">
.header {
  color: #fff;
  position: fixed;
  top: 0;
  box-sizing: border-box;
  text-align: center;
  width: 100%;
  height: 40px;
  background-color: rgb(205, 59, 69);
  padding: 5px 5px;
  span {
    position: absolute;
    left: 10px;
    display: inline-block;
    height: 30px;
    line-height: 30px;
  }
  div {
    display: inline-block;
    height: 30px;
    line-height: 30px;
  }
}
</style>

